﻿using System;

namespace Model
{
    public class YX_TradeBill : IYX_Bill_Base
    {
        /// <summary>
        /// 商业汇票ID
        /// </summary>
        public decimal N_TRADEBILL_ID { get; set; }

        /// <summary>
        /// 商业汇票出票人公司ID
        /// </summary>
        public decimal N_TRADEBILL_DRAWERCMYID { get; set; }

        /// <summary>
        /// 商业汇票出票人银行ID
        /// </summary>
        public decimal N_TRADEBILL_DRAWERBANKID { get; set; }

        /// <summary>
        /// 商业汇票出票人账户
        /// </summary>
        public string C_TRADEBILL_DRAWERACCOUNT { get; set; }

        /// <summary>
        /// 商业汇票出票人ID
        /// </summary>
        public decimal N_TRADEBILL_DRAWERID { get; set; }

        /// <summary>
        /// 商业汇票付款人
        /// </summary>
        public string C_TRADEBILL_PAYERNAME { get; set; }

        /// <summary>
        /// 商业汇票收款人公司
        /// </summary>
        public string C_TRADEBILL_PAYEECMYNAME { get; set; }

        /// <summary>
        /// 商业汇票出票人银行
        /// </summary>
        public string C_TRADEBILL_PAYEEBANKNAME { get; set; }

        /// <summary>
        /// 商业汇票收款人账户
        /// </summary>
        public string C_TRADEBILL_PAYEEACCOUNT { get; set; }

        /// <summary>
        /// 商业汇票收款人
        /// </summary>
        public string C_TRADEBILL_PAYEENAME { get; set; }

        /// <summary>
        /// 商业汇票出票金额
        /// </summary>
        public decimal N_TRADEBILL_INVOICEVALUE { get; set; }

        /// <summary>
        /// 商业汇票出票日期
        /// </summary>
        public DateTime D_TRADEBILL_STARTDATE { get; set; }

        /// <summary>
        /// 商业汇票到期日期
        /// </summary>
        public DateTime D_TRADEBILL_ENDDATE { get; set; }

        /// <summary>
        /// 商业汇票交易合同号
        /// </summary>
        public string C_TRADEBILL_CODE { get; set; }

        /// <summary>
        /// 商业汇票能否转让（0表示不能，1表示能，默认为1）
        /// </summary>
        public decimal N_TRADEBILL_IFOFFER { get; set; }

        /// <summary>
        /// 商业汇票备注
        /// </summary>
        public string C_TRADEBILL_REMARK { get; set; }

        #region YX_Bill_Base 成员

        public int ID
        {
            get
            {
                return (int)N_TRADEBILL_ID;
            }
            set
            {
                N_TRADEBILL_ID = value;
            }
        }

        public int DE_COMPANY_ID
        {
            get
            {
                return (int)N_TRADEBILL_DRAWERCMYID;
            }
            set
            {
                N_TRADEBILL_DRAWERCMYID = value;
            }
        }

        public int DE_BANK_ID
        {
            get
            {
                return (int)N_TRADEBILL_DRAWERBANKID;
            }
            set
            {
                N_TRADEBILL_DRAWERBANKID = value;
            }
        }

        public string ACCOUNT
        {
            get
            {
                return C_TRADEBILL_DRAWERACCOUNT;
            }
            set
            {
                C_TRADEBILL_DRAWERACCOUNT = value;
            }
        }

        public string PAYEENAME
        {
            get
            {
                return C_TRADEBILL_PAYEENAME;
            }
            set
            {
                C_TRADEBILL_PAYEENAME = value;
            }
        }

        public DateTime? START_DATE
        {
            get
            {
                return D_TRADEBILL_STARTDATE;
            }
            set
            {
                if (value != null)
                {
                    D_TRADEBILL_STARTDATE = value.Value;
                }
            }
        }

        public decimal PAY_AMOUNT
        {
            get
            {
                return (int)N_TRADEBILL_INVOICEVALUE;
            }
            set
            {
                N_TRADEBILL_INVOICEVALUE = value;
            }
        }

        public string DE_CODE
        {
            get
            {
                return C_TRADEBILL_CODE;
            }
            set
            {
                C_TRADEBILL_CODE = value;
            }
        }

        public string REMARK
        {
            get
            {
                return C_TRADEBILL_REMARK;
            }
            set
            {
                C_TRADEBILL_REMARK = value;
            }
        }

        #endregion YX_Bill_Base 成员
    }

    public class YX_Bill_Base
    {
        /// <summary>
        /// 汇票ID
        /// </summary>
        public int N_ID { get; set; }

        /// <summary>
        /// 汇票出票人公司ID
        /// </summary>
        public int N_COMPANY_ID { get; set; }

        /// <summary>
        /// 汇票出票人银行ID
        /// </summary>
        public int N_BANK_ID { get; set; }

        /// <summary>
        /// 汇票出票人账户
        /// </summary>
        public string C_ACCOUNT { get; set; }

        /// <summary>
        /// 汇票收款人
        /// </summary>
        public string C_PAYEENAME { get; set; }

        /// <summary>
        /// 汇票出票日期
        /// </summary>
        public DateTime? D_START_DATE { get; set; }

        /// <summary>
        /// 汇票出票金额
        /// </summary>
        public decimal N_PAY_AMOUNT { get; set; }

        /// <summary>
        /// 汇票交易合同号
        /// </summary>
        public string C_CODE { get; set; }

        /// <summary>
        /// 汇票备注
        /// </summary>
        public string C_REMARK { get; set; }
    }

    public class SS : YX_Bill_Base
    {
        /// <summary>
        /// 商业汇票出票人ID
        /// </summary>
        public decimal N_TRADEBILL_DRAWERID { get; set; }

        /// <summary>
        /// 商业汇票付款人
        /// </summary>
        public string C_TRADEBILL_PAYERNAME { get; set; }

        /// <summary>
        /// 商业汇票收款人公司
        /// </summary>
        public string C_TRADEBILL_PAYEECMYNAME { get; set; }

        /// <summary>
        /// 商业汇票收款人银行
        /// </summary>
        public string C_TRADEBILL_PAYEEBANKNAME { get; set; }

        /// <summary>
        /// 商业汇票收款人账户
        /// </summary>
        public string C_TRADEBILL_PAYEEACCOUNT { get; set; }

        /// <summary>
        /// 商业汇票到期日期
        /// </summary>
        public DateTime D_TRADEBILL_ENDDATE { get; set; }

        /// <summary>
        /// 商业汇票能否转让（0表示不能，1表示能，默认为1）
        /// </summary>
        public decimal N_TRADEBILL_IFOFFER { get; set; }
    }
}